home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dimension 64 1
/
Dimension_64_Nr.01_19xx_-_de_Side_A.d64
/
+ 17 blocks frei
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
74 lines
10 poke53280,0:poke53281,0
20 print"[147][158]664 + 17 blocks free"
30 fori=1to2000:next
40 print"die 17 blocks kommen von der 18.spur"
50 open1,8,15,"i":open2,8,2,"#"
60 dimt(25),s(25),e(25)
70 print#1,"u1:"2;0;18;0
80 get#2,t$,s$
90 t(0)=asc(t$+chr$(0)):s(0)=asc(s$+chr$(0)):t=t(0):s=s(0):b=1
100 print#1,"u1:"2;0;t;s
110 get#2,t$,s$
120 t=asc(t$+chr$(0)):s=asc(s$+chr$(0))
130 ift=0ort>35ors>20orb=25then160
140 t(b)=t:s(b)=s:e(b-1)=8:b=b+1
150 goto100
160 m=b:f=0:fori=2to226step32
170 print#1,"b-p:"2,i
180 get#2,w$
190 ifw$=""thenf=f+1
200 nexti
210 e(b-1)=8-f
220 iff=8andm=1then700
230 print"[147]genuegen die";f;"freien directoryplaetze"
240 geta$:ifa$=""then240
250 ifa$<>"j"thenprint"ja"
260 print#1,"u1:"2;0;18;0
270 print#1,"b-p:"2,73
280 b=0:l=19:dimz(25):fori=1to3:get#2,w$
290 w=asc(w$+chr$(0))
300 forj=1to8:w=w/2:ifw=int(w)thenz(b)=1
310 ifz(b)=0anda$<>"j"thena$="":z(b)=1
320 ifz(b)=1andb<19thenl=l-1
330 b=b+1:w=int(w):nextj,i
340 ifl<1then710
350 printl;" bloecke werden frei"
360 b=0
370 fore=0toe(b)-1
380 at=t(b):as=s(b):ns=as:ifat=0andas=0then680
390 i=0:z=e*32+3
400 r=0
410 print#1,"u1:"2;0;at;as
420 print#1,"b-p:"2,z
430 get#2,t$,s$
440 t=asc(t$+chr$(0)):s=asc(s$+chr$(0))
450 ift=18then660
460 ift=0ort>35ors>20thenz=1:goto560
470 fori=0to18step10
480 ifz(i)=0then530
490 ifi=9then520
500 ifi>8theni=i-9:goto480
510 nexti
520 z=-1:goto560
530 print#1,"b-p:"2,z
540 print#2,chr$(18);chr$(i);
550 ifat=18andas=nsthenr=1
560 print" block";right$(" "+str$(at),3);","right$(" "+str$(as),3);
570 ifr=1thenprint" zeiger";e+1;"geaendert":goto590
580 print" --> 18,";right$(" "+str$(ns),3)
590 print#1,"b-a:"0,18,ns
600 print#1,"b-f:"0,at,as
610 z(i)=1
620 print#1,"u2:"2;0;18;ns
630 at=t:as=s:ns=i
640 ifz=-1then730
650 ifz<>1thenz=0:goto400
660 nexte
670 b=b+1:goto370
680 print"nicht alle freien blocks wurden belegt, teile der spur 18 sind noch frei"
690 goto730
700 print"die disk ist leer":goto730
710 print"leider nichts zu machen, keine freien"
720 print"blocks mehr vorhanden"
730 print:close1:close2:end